package com.joven.shelltest.utils.decorator;

/**
 * @author wzj
 * @since 2025/6/25 10:13
 */
public class OtherCostService implements TimeService{
    private final TimeService timeService;

    public OtherCostService(TimeService timeService) {
        this.timeService = timeService;
    }


    @Override
    public void doSomething() {
        long start = System.currentTimeMillis();
        timeService.doSomething();
        long end = System.currentTimeMillis();
        System.out.println("耗时:" + (end - start)+"ms");
    }
}
